home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / newsgroups / misc.20031118-20041115 / 000277_thucdat@hotmail.com_Tue May 4 11:56:04 2004.msg < prev    next >
Internet Message Format  |  2020-01-01  |  3KB

  1. Path: newsmaster.cc.columbia.edu!panix!news.maxwell.syr.edu!postnews1.google.com!not-for-mail
  2. From: thucdat@hotmail.com (Dat Nguyen)
  3. Newsgroups: comp.protocols.kermit.misc
  4. Subject: The Unknown C-Kermit.
  5. Date: 3 May 2004 15:02:34 -0700
  6. Organization: http://groups.google.com
  7. Lines: 45
  8. Message-ID: <6b1f50ac.0405031402.31a93918@posting.google.com>
  9. NNTP-Posting-Host: 24.118.27.71
  10. Content-Type: text/plain; charset=ISO-8859-1
  11. Content-Transfer-Encoding: 8bit
  12. X-Trace: posting.google.com 1083621754 10962 127.0.0.1 (3 May 2004 22:02:34 GMT)
  13. X-Complaints-To: groups-abuse@google.com
  14. NNTP-Posting-Date: Mon, 3 May 2004 22:02:34 +0000 (UTC)
  15. Xref: newsmaster.cc.columbia.edu comp.protocols.kermit.misc:14996
  16.  
  17. If you are using C-Kermit to do some simple communication tasks
  18. between two computers, you are under utilizing C-Kermit. Since the
  19. release of version 8.0, C-Kermit is a versatile instrument that can be
  20. used to do many things that you are unaware of.
  21.  
  22. Consider that Delphi and Visual Basic run only on Windows, Java won't
  23. run on many platforms for years to come (i.e. Stratus VOS) and
  24. Smalltalk exists only for a few OS. C-Kermit has been the "WRITE ONCE
  25. RUN EVERYWHERE" since the 1980s.
  26.  
  27. Take one classic problem in operating system: the Dinning
  28. Philosophers. The Dinning Philosophers problem can be stated as
  29. follows:
  30.  
  31. "Five philosophers spend their lives thinking, eating, and sleeping.
  32. The Philosophers sit around a table where there is a bowl of rice and
  33. five chopsticks. Each philosopher compete for two chopsticks to eat."
  34.  
  35. To solve this problem, one needs supports from the running environment
  36. like semaphore, timer, fork, multiprocessing, and concurrency.
  37. C-Kermit does not provide all that, but you can create them and solve
  38. the Dinning Philosophers problem in C-Kermit.
  39.  
  40. The whole thing is easier to do in OOP fashion where each philosopher
  41. is presented by an object. These objects line up in a queue executed
  42. in turn by a process object. Each philosopher object carries with
  43. itself a softtimer that is timed when the object gets processed.
  44.  
  45. The philosopher objects compete for chopsticks which are binary
  46. semaphore objects. The semaphores keep tracks of the philosophers
  47. waiting for chopsticks to be available. Whenever the chopsticks are
  48. released by eating philosopher objects, the semaphores send the
  49. waiting philosopher objects to the process object queue.
  50.  
  51. This model of processing are applicable to a variety of complex
  52. programming task where resources are competed, state of running
  53. objects continously change. And since C-Kermit can communicate with
  54. other computers, many useful administration tasks and communication
  55. applications can be done comfortably.
  56.  
  57. For the solution of the Dinning Philosophers problem in C-Kermit, see:
  58.  
  59. http://www.columbia.edu/kermit/ckscripts.html#oops
  60.  
  61. Dat Nguyen